<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class Consumable extends Model
{
    protected $table = 'consumable';

    protected $fillable = [
        'name', 'price', 'weight', 'remark', 'length', 'width', 'height'
    ];

    /**
     * @author luffyzhao@vip.126.com
     */
    public function logs()
    {
        return $this->hasMany(ConsumableLog::class);
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function stocks()
    {
        return $this->hasMany(ConsumableStock::class);
    }

}
